package L1;

public class DaemonDemo {
    public static void main(String[] args) {
        Thread t1 = new Thread(() -> {
            System.out.println(Thread.currentThread().getName());
        }, "t1");

        t1.setDaemon(true); //设置守护线程
        t1.start();
    }
}
